<template>
  <div class="adSlect_container flx-c">
    <div v-for="(item, index) in List" :key="index" class="flx-c" @click="onSelect(index)">
      <img v-if="select == index" src="@/assets/img/arc_on.png">
      <img v-else src="@/assets/img/arc_off.png">
      <div class="item">
        <div style="width: 100%;min-width: max-content;">{{ item.enterpriseName }}</div>
        <div style="width: 40%;min-width: max-content;"><span>企业名称</span>：{{ item.enterpriseName }}</div>
        <div style="width: 35%;min-width: max-content;"><span style="width: 120px;">统一信用码</span>：{{ item.unionCode }}
        </div>
        <div style="width: 25%;min-width: max-content;"><span>行业属性</span>：{{ item.industryType }}</div>
        <div style="width: 40%;min-width: max-content;"><span>法人名字</span>：{{ item.corporationName }}</div>
        <div style="width: 60%;min-width: max-content;"><span style="width: 120px;">法人身份证号</span>：{{
          item.corporationIdcard
        }}</div>
        <div style="width: 40%;min-width: max-content;"><span>电话1</span>：{{ item.phone2 }}</div>
        <div style="width: 35%;min-width: max-content;"><span style="width: 120px;">电话2</span>：{{ item.phone2 }}
        </div>
        <div style="width: 25%;min-width: max-content;"><span>邮箱</span>：{{ item.email }}</div>
      </div>
      <!-- <div class="btnnn flx-c" @click.stop="comSelect(index)">确认</div> -->
    </div>
  </div>
</template>

<script>
export default {
  name: 'adSelect',
  props: ['List', 'selectII'],
  data() {
    return {
      num: 0,
      select: this.selectII || -1,
      // List: [{
      //     id: '1',
      //     title: '广告主1',
      //     cName: '漳州趣故事信息技术有限公司',
      //     name: 'xxx',
      //     phone1: '13000000000',
      //     phone2: '13000000001',
      //     code: '111111111',
      //     idcard: '1111111111',
      //     type: '行业属性',
      //     email: '11111@qq.com'
      //   },
      //   {
      //     id: '2',
      //     title: '广告主1',
      //     cName: '漳州趣故事信息技术有限公司',
      //     name: 'xxx',
      //     phone1: '13000000000',
      //     phone2: '13000000001',
      //     code: '111111111',
      //     idcard: '1111111111',
      //     type: '行业属性',
      //     email: '11111@qq.com'
      //   },
      //   {
      //     id: '3',
      //     title: '广告主1',
      //     cName: '漳州趣故事信息技术有限公司',
      //     name: 'xxx',
      //     phone1: '13000000000',
      //     phone2: '13000000001',
      //     code: '111111111',
      //     idcard: '1111111111',
      //     type: '行业属性',
      //     email: '11111@qq.com'
      //   },
      //   {
      //     id: '4',
      //     title: '广告主1',
      //     cName: '漳州趣故事信息技术有限公司',
      //     name: 'xxx',
      //     phone1: '13000000000',
      //     phone2: '13000000001',
      //     code: '111111111',
      //     idcard: '1111111111',
      //     type: '行业属性',
      //     email: '11111@qq.com'
      //   },
      //   {
      //     id: '5',
      //     title: '广告主1',
      //     cName: '漳州趣故事信息技术有限公司',
      //     name: 'xxx',
      //     phone1: '13000000000',
      //     phone2: '13000000001',
      //     code: '111111111',
      //     idcard: '1111111111',
      //     type: '行业属性',
      //     email: '11111@qq.com'
      //   }
      // ]
    }
  },
  methods: {
    onSelect(index) {
      this.select = index
      this.$emit('selectIdx', index)
    },
    comSelect(index) {
      this.select = index
      this.$emit('comSelect', index)
    },
  }
}
</script>

<style scoped lang="scss">
.adSlect_container {
  flex-direction: column;
  justify-content: flex-start;
  // padding: 40px;

  &>div {
    padding: 0 10px;
    margin-bottom: 20px;

    img {
      cursor: pointer;
      transition: .3s all;
      margin-right: 20px;
    }

    .item {
      // width: 1240px;
      width: 100%;
      // height: 212px;
      display: flex;
      flex-wrap: wrap;
      padding: 30px;
      box-sizing: border-box;
      font-size: 18px;
      color: #333;
      background-color: #fff;
      box-shadow: 0 1px 4px 0 #ccc;
      border-radius: 20px;
      cursor: pointer;
    }
  }
}

.btnnn {
  margin-left: 30px;
  width: 80px;
  height: 50px;
  border-radius: 5px;
  background: #FF68B2;
  font-size: 14px;
  color: #FFFFFF;
  cursor: pointer;
}

.flx-sb {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.flx-st {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.flx-c {
  display: flex;
  align-items: center;
  justify-content: center;
}
</style>
